<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
	xmlns:s="/struts-tags" xmlns:sj="/struts-jquery-tags">
	<jsp:directive.page language="java"
		contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
	<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<jsp:text>
	<![CDATA[ 				
		<script type="text/javascript" src="${pageContext.request.contextPath}/aplicacion/departamento/gestionar-departamento/js/index.js"></script>
		 ]]>
</jsp:text>
<title>Gestionar Departamento</title>
</head>
<!-- Head -->
<body>
	<div class="row">
		<div align="center">
			<h1>Gestionar Departamento</h1>
		</div>

	</div>
	<div class="row">
		<div class="col-md-12">
			<s:actionmessage theme="jquery" />
		</div>
	</div>
	<br />
	<div class="row">
		<div class="col-md-12">

			<table class="table table-hover table-bordered" id="tblDepartamento">
				<thead>
					<tr>
						<th>Nombre</th>
						<th>Localización</th>
						<th>Jefe</th>
						<th>Acciones</th>
					</tr>
				</thead>
				<tbody>

					<s:iterator value="listDepartamento" var="departamento">
						<tr>
							<td><s:property value="nombre" /></td>
							<td><s:property value="localizacion" /></td>
							<td><s:property value="jefe.email" /></td>
							<td>


								<div align="center">
									<a
										href="${pageContext.request.contextPath}/departamento/gestionar-departamento/${idDepartamento}/edit">
										<img height="20" width="20"
										src="${pageContext.request.contextPath}/images/icons/update.png"
										title="Eliminar departamento" />
									</a> <a
										href="${pageContext.request.contextPath}/departamento/gestionar-departamento/${idDepartamento}/deleteConfirm">
										<img style="padding-left: 10px;" height="20" width="30"
										src="${pageContext.request.contextPath}/images/icons/delete.png"
										title="Eliminar departamento" />
									</a>
								</div>
							</td>
						</tr>
					</s:iterator>
				</tbody>
			</table>

		</div>
		<div class="row">
			<div align="center">
				<input type="button" value="Registrar departamento"
					class="btn-primary btn"
					onclick="location.href='${pageContext.request.contextPath}/departamento/gestionar-departamento/new'" />
			</div>
		</div>
	</div>
</body>
	</html>
</jsp:root>